<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@page import="com.cap.bts.framework.usermgnt.constant.EmployeeStatus"%>    
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>上传需要添加的DMS套餐信息文件</title>
<%@include file="../include/include.jsp"%>
<link rel="stylesheet" type="text/css" href="${csspath }/public.css"/>
<link rel="stylesheet" type="text/css" href="${csspath }/datepicker.css"/>
<link rel="stylesheet" type="text/css" href="${csspath }/style_l.css"/>
<script type="text/javascript" src="${jspath }/jquery-1.4.4.js"></script>
<script type="text/javascript" src="${jspath }/jquery.ui.min.js"></script>
<script type="text/javascript" src="${jspath }/ui.datepicker_zh-CN.js"></script>
<script type="text/javascript" src="${jspath }/jquery.blockUI.js"></script>
<script type="text/javascript" src="${jspath }/public.js"></script>
<script type="text/javascript" src="${jspath }/jquery.selectAll.js"></script>
<script type="text/javascript" src="${jspath}/jquery/jquery.ui.draggable.js"></script>
<script type="text/javascript" src="${jspath}/jquery/jquery.alerts.js"></script>
<script type="text/javascript" src="${jspath}/load_layer.js"></script>
<link rel="stylesheet" type="text/css" href="${csspath}/jquery.alerts.css" />

<link rel="stylesheet" type="text/css"
	href="${webcontext}/css/validationEngine.jquery.css" />
<script src="${jspath}/jquery/validate/jquery.validationEngine.js"
	type="text/javascript"></script>
<script src="${jspath}/jquery/validate/jquery.validationEngine-zh.js"
	type="text/javascript"></script>
	<script type="text/javascript"
	src="${webcontext}/javascript/jquery/jquery.ui.draggable.js"></script>
<style type="text/css">
.formError .formErrorContent {
    -moz-border-radius: 6px 6px 6px 6px;
    -moz-box-shadow: 0 0 6px #000000;
    background: none repeat scroll 0 0 #EE0101;
    border: 2px solid #DDDDDD;
    color: #FFFFFF;
    font-family: tahoma;
    font-size: 11px;
    padding: 4px 10px;
    width: 100px;
}
a {
display:block;
width:100px;
height:40px;
border:1px solid #CCC;
background:#FFF;
}
</style>

<script type="text/javascript">
var myHeight = 0;
$(function(){
	
});

function upload() {
	if($("#file").val() == ''){
		jAlert("请选择需要上传的文件！", "提示信息");
		return ;		
	}else{
		info_form.action="${webcontext}/crmdp/dealer/masterdata/uploadDataFixPage";
		document.getElementById("info_form").submit();
	}
}

</script> 
</head>
<body>
			<!-- content -->
	<div id="content">
		    <div class="spliter h_5"></div>
			<div class="page_info">
			</div>
			          <div class="spliter h_5"></div>
		<!-- wrap -->
		<div id="wrap">
			<!-- info_div -->
	<form:form id="info_form" method="post" modelAttribute="dto" enctype="multipart/form-data"><br></br>
	<table class="block_tab">
		<tr>
		<td class="label">文件上传：</td>
		<td  colspan="5">
            <input  type="file" id="file" value="上传"  name="dmsDateFixFile"  class="validate[required];"
                     alt="上传"/>&nbsp;
            <input type="button" value="   上  传   " onclick="upload();" />&nbsp;&nbsp;
		    <core:choose>
		        <core:when test="${empty fileName}">
					<input type="hidden" value="${fileName}" readonly="readonly"/>		
				</core:when>
				<core:otherwise>	
					<input type="text" value="${fileName}" style="width: 500px;border: 0 solid #fff;" readonly="readonly"/>										
				</core:otherwise>  
		    </core:choose>
           </td>		 	
		<core:choose>
			<core:when test="${suc && !uploadResult}">
				<td style="color: red">请导入数据</td>			
			</core:when>
			<core:otherwise>
				<core:choose>
					<core:when test="${suc && uploadResult}">
						<td style="color: red">数据导入成功</td>				
					</core:when>
					<core:otherwise>	
						<core:choose>
							<core:when test="${!suc && uploadResult}">
								<td style="color: red">数据导入失败</td>				
							</core:when>
							<core:otherwise>	
									<td style="color: red">数据导入失败,请联系管理员</td>													
							</core:otherwise>  	
						</core:choose>													
					</core:otherwise>  
				</core:choose>	
			</core:otherwise>
		</core:choose>											
		</tr>
		</table>
		<core:if test="${dataFixPrcResultDto != null}">
			<font style="color: red">导入后数据处理状态：${dataFixPrcResultDto.returnCode}&nbsp;&nbsp;具体状态信息：${dataFixPrcResultDto.errorMessage}</font>
		</core:if>
		<!-- data_div -->
		<div class="data_div">
		</div>
		<!-- /data_div --> 		    
  </form:form>
		</div>
		<!-- /wrap -->
		</div>
	<!-- /content -->
  </body>
</html>